import React, { useState } from "react";
import { Order_Tab, Order_Item } from "./style.js";
import {ComponentTitle} from '../../../assets/global-style'

const Order = (props) => {
  const { order } = props;
  return (
    <Order_Tab>
      <ComponentTitle>我的订单</ComponentTitle>
      <Order_Item>
        {order.map((item, index) => {
          return (
            <li className="order_item" key={index}>
              <div className="order_icon">
                <svg className="icon" aria-hidden="true">
                  <use xlinkHref={item.icon_name}></use>
                </svg>
              </div>
              <div className="order_text">{item.title}</div>
            </li>
          );
        })}
      </Order_Item>
    </Order_Tab>
  );
};

export default Order;
